package com.ln.de1110.demo01;

/**
 * @author Ln
 * @version 终极版
 * @date 2022/11/10 15:51
 */
public class Rectangle extends LengthWide{
    private int length;
    private int wide;

    public Rectangle(int length, int wide) {
        this.length = length;
        this.wide = wide;
    }

    @Override
    public void area() {
        System.out.println("面积:"+length*wide);
    }

    @Override
    public void perimeter() {
        System.out.println("周长:"+(length+wide)*2);
    }
}
